var ws, title, address, coord;
document.addEventListener('plusready', function(){
	ws = plus.webview.currentWebview();
	title = ws.title;
	address = ws.address;
	coord = ws.coord;
	console.log(title+" "+address+' '+coord);
	$('.title').text(title);
	$('.address').text(address);
	var swidth = window.innerWidth;
	var sheight = window.innerHeight;
	console.log(swidth +" "+sheight);
	if(swidth)$('#allmap').css('width',swidth);
	if(sheight)$('#allmap').css('height',sheight-80);
	coord = coord.split(',');
	// 百度地图API功能
	var map = new BMap.Map("allmap");
	//显示地图
	var point = new BMap.Point(coord[0],coord[1]);
	map.centerAndZoom(point, 16);//缩放比例
	map.enableScrollWheelZoom(true);
	// 用经纬度设置地图中心点
	map.clearOverlays(); 
	var new_point = new BMap.Point(coord[0],coord[1]);
	var marker = new BMap.Marker(new_point);  // 创建标注
	map.addOverlay(marker);              // 将标注添加到地图中
}, false)